<?php /* Smarty version Smarty-3.1.15, created on 2017-02-18 11:18:42
         compiled from "D:\www\osadmin\uploads\include\template\panel\consumable_alarm.tpl" */ ?>
<?php /*%%SmartyHeaderCode:809558a7abbc0fea51-05695998%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'abef09b0495a1354b50f83919400b0c35d0bccb6' => 
    array (
      0 => 'D:\\www\\osadmin\\uploads\\include\\template\\panel\\consumable_alarm.tpl',
      1 => 1487387914,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '809558a7abbc0fea51-05695998',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.15',
  'unifunc' => 'content_58a7abbc182222_33627017',
  'variables' => 
  array (
    'osadmin_action_alert' => 0,
    'osadmin_quick_note' => 0,
    'Consumables' => 0,
    'machineConsumables' => 0,
    'page_html' => 0,
    'osadmin_action_confirm' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_58a7abbc182222_33627017')) {function content_58a7abbc182222_33627017($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<!--- START 以上内容不需更改，保证该TPL页内的标签匹配即可 --->

<?php echo $_smarty_tpl->tpl_vars['osadmin_action_alert']->value;?>

<?php echo $_smarty_tpl->tpl_vars['osadmin_quick_note']->value;?>


</div>
    <div class="block">
	<a href="#page-stats" class="block-heading" data-toggle="collapse">未拜访报警列表</a>
	<div id="page-stats" class="block-body collapse in">
		<table class="table table-striped">
			<thead>
			<tr>
				<th>#</th>
				<th>耗材货号</th>
				<th>开始日期</th>
				<th>使用天数</th>
				<th>到期日期</th>
				<th>距耗材到期时间</th>
				<th width="80px">操作</th>
			</tr>
			</thead>
			<tbody>							  
			<?php  $_smarty_tpl->tpl_vars['machineConsumables'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['machineConsumables']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['Consumables']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['machineConsumables']->key => $_smarty_tpl->tpl_vars['machineConsumables']->value) {
$_smarty_tpl->tpl_vars['machineConsumables']->_loop = true;
?>
			   <?php if ($_smarty_tpl->tpl_vars['machineConsumables']->value['month_diff']<=6&&$_smarty_tpl->tpl_vars['machineConsumables']->value['month_diff']>=0) {?>			 
				<tr>
				    <td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['machine_id'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['consumable_item'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['beg_time'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['use_days'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['end_time'];?>
</td>
					<td style="color:red;">距耗材到期还有不到半年</td>
					<td>
						<a href="machine_modify.php?method=modify&machine_id=<?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['machine_id'];?>
" title="修改" ><i class="icon-pencil"></i></a>
						&nbsp;
					</td>
				</tr>
				<?php } elseif ($_smarty_tpl->tpl_vars['machineConsumables']->value['month_diff']<0) {?>
				<tr>
				    <td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['machine_id'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['consumable_item'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['beg_time'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['use_days'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['end_time'];?>
</td>
					<td style="color:red;">耗材已经到期</td>
					<td>
						<a href="machine_modify.php?method=modify&machine_id=<?php echo $_smarty_tpl->tpl_vars['machineConsumables']->value['machine_id'];?>
" title="修改" ><i class="icon-pencil"></i></a>
						&nbsp;
					</td>
				</tr>
				<?php }?>
			<?php } ?>
		  </tbody>
		</table>  
	</div>
	<!--- START 分页模板 --->
            <?php echo $_smarty_tpl->tpl_vars['page_html']->value;?>

    <!--- END --->
</div>
<!---操作的确认层，相当于javascript:confirm函数--->
<?php echo $_smarty_tpl->tpl_vars['osadmin_action_confirm']->value;?>


<!--- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 --->
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
